package Homework.Top8;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Test1 {
    public static void main(String[] args) {
        String adress="4399.com";
        try{
            InetAddress[] ias=InetAddress.getAllByName(adress);
            for (InetAddress ia : ias) {
                System.out.println("服务器端口："+ia.getHostAddress());
                System.out.println("域名："+ia.getHostName());
            }
        }catch (UnknownHostException e){
            e.printStackTrace();
        }
    }
}
